package pl.koziolekweb.szkola.NKBeans;

// NK-Beans/Info.java
 
import javax.swing.*;
import java.beans.*;

  // widok modelu Kibice
public class Info extends JTextField
        implements PropertyChangeListener {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Info() {
        super(30);
        setText("Legia: 0;  Polonia: 0");
        setEditable(false);
    }

    // wywolywana gdy zmieni sie model
    public void propertyChange(PropertyChangeEvent e) {
        int[] kibice = (int[])e.getNewValue();
        setText("Legia: " + kibice[0] +
           ";  Polonia: " + kibice[1]);
    }
}
